package com.netflexitysolutions.amazonws.ec2;

import java.util.HashMap;
import java.util.Map;

public enum Architecture {
	
	i386("i386"), x86_64("x86_64");
	
	private static Map<String, Architecture> architectureByName = new HashMap<String, Architecture>();
	
	static {
		Architecture[] archs = Architecture.values();
		for (Architecture architecture : archs) {
			architectureByName.put(architecture.getName(), architecture);
		}
	}
	
	public static Architecture architectureForName(String name) {
		return architectureByName.get(name);
	}
	
	private String name;
	
	private Architecture(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
}
